function axios(url, method = 'GET', data) {
	return new Promise((resolve, reject) => {
		uni.request({
			url,
			method,
			timeout: 6000,
			header: {
				"Content-type": 'application/json'
			},
			data,
			success(res) {
				resolve(res)
			},
			fail(err) {
				reject(err)
			}
		})
	})
}

export default axios
